package xkp.lesson5;

public class Demo1 {
	public static void main(String[] args) {
		
		//Double d1 = 3.14;
		double d2 = 3.14;
		//ceil向上取整
		System.out.println(Math.ceil(d2));
		System.out.println(Math.floor(d2));
		System.out.println(Math.round(d2));
		System.out.println(Math.pow(4,3));
		//random()返回0<=n<1
		System.out.println(Math.random());
		//返回0<=n<=100之间的正整数
		//此处还有bug
		Integer n = (int) Math.ceil(Math.random()*100);
		System.out.println(n);
		//Math.random()*100+1
		//20-100
		//(Math.random()*80+1)+20
		
	}
}
